<template>
  <div>
    <slot name="header" :age="person.age" />
    <p>DDDDD</p>
    <!-- 子组件给父组件默认插槽传递age数据 -->
    <slot :age="person.age" :sex="person.sex" />
    <slot name="footer" :age="person.age" />
  </div>
</template>

<script>
export default {
  name: "DChild",
  data() {
    return {
      person: {
        sex: "男",
        age: 18,
      },
    };
  },
};
</script>

<style></style>
